Class QRCodeScannerSDK
java.lang.Object
com.vasco.digipass.sdk.utils.qrcodescanner.QRCodeScannerSDK
Provides methods for QR Code and Cronto Code scanning
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a result of image decoding.
Contains decoded data and image format. -
Method Summary
Modifier and TypeMethodDescriptiondecodeImage(android.media.Image image, int codeType) Decodes an image containing Cronto or QR code.
Requires using CameraX API.
Warning: The method processes the image and this could take some time to achieve.
The process time depends on the size of the input image, make sure input image is not too big.
Also, the decode process should be performed on another thread so that the main thread isn't blocked.
-
Method Details
-
decodeImage
public static QRCodeScannerSDK.QRCodeScannerSDKDecodingResultData decodeImage(android.media.Image image, int codeType) throws QRCodeScannerSDKException, LinkageError Decodes an image containing Cronto or QR code.
Requires using CameraX API.
Warning: The method processes the image and this could take some time to achieve.
The process time depends on the size of the input image, make sure input image is not too big.
Also, the decode process should be performed on another thread so that the main thread isn't blocked.- Parameters:
image- Image object to decodecodeType- indicates type of the image. A mask with possible values:
- QRCodeScannerSDKConstants.CRONTO_CODE - QRCodeScannerSDKConstants.QR_CODE - QRCodeScannerSDKConstants.CRONTO_CODE + QRCodeScannerSDKConstants.QR_CODE- Returns:
- QRCodeScannerSDKDecodingResultData containing decoded data and image format
- Throws:
QRCodeScannerSDKException- in case the image could not be decodedLinkageError
-